From 968149a9952b9be9b471dfe769ff3946773f5dad Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 16 May 2006 15:23:01 +0000 Subject: [PATCH] Add labels for page orientations, also add the fourth one. (#339589) 2006-05-16 Matthias Clasen * gtk/gtkpagesetupunixdialog.c (populate_dialog): Add labels for page orientations, also add the fourth one. (#339589) * gtk/stock-icons/24/gtk-orientation-reverse-portrait.png: New icon. * gtk/Makefile.am: Add it here. * gtk/gtkstock.[hc]: Add stock items for the page orientations. --- ChangeLog | 12 ++++ ChangeLog.pre-2-10 | 12 ++++ docs/reference/ChangeLog | 5 ++ docs/reference/gtk/Makefile.am | 1 + docs/reference/gtk/tmpl/gtkstock.sgml | 15 +++- gtk/Makefile.am | 1 + gtk/gtkpagesetupunixdialog.c | 65 +++++++++++------- gtk/gtkstock.c | 4 ++ gtk/gtkstock.h | 1 + .../24/gtk-orientation-reverse-portrait.png | Bin 0 -> 871 bytes 10 files changed, 89 insertions(+), 27 deletions(-) create mode 100644 gtk/stock-icons/24/gtk-orientation-reverse-portrait.png diff --git a/ChangeLog b/ChangeLog index 71512ccace..76c213521d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-05-16 Matthias Clasen + + * gtk/gtkpagesetupunixdialog.c (populate_dialog): Add labels + for page orientations, also add the fourth one. (#339589) + + * gtk/stock-icons/24/gtk-orientation-reverse-portrait.png: New + icon. + + * gtk/Makefile.am: Add it here. + + * gtk/gtkstock.[hc]: Add stock items for the page orientations. + 2006-05-16 Michael Natterer * gtk/gtktoolbar.c: added "max-child-expand" style property which diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 71512ccace..76c213521d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,15 @@ +2006-05-16 Matthias Clasen + + * gtk/gtkpagesetupunixdialog.c (populate_dialog): Add labels + for page orientations, also add the fourth one. (#339589) + + * gtk/stock-icons/24/gtk-orientation-reverse-portrait.png: New + icon. + + * gtk/Makefile.am: Add it here. + + * gtk/gtkstock.[hc]: Add stock items for the page orientations. + 2006-05-16 Michael Natterer * gtk/gtktoolbar.c: added "max-child-expand" style property which diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 82528ef56c..4c71597bc2 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +2006-05-16 Matthias Clasen + + * gtk/tmpl/gtkstock.sgml: + * gtk/Makefile.am: Add fourth stock orientation. + 2006-05-15 Matthias Clasen * gtk/tree_widget.sgml: Fix up example rendering. (#341855, Guillaume diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am index 62275b487e..25634b6fd0 100644 --- a/docs/reference/gtk/Makefile.am +++ b/docs/reference/gtk/Makefile.am @@ -215,6 +215,7 @@ HTML_IMAGES = \ $(top_srcdir)/gtk/stock-icons/24/gtk-orientation-landscape.png \ $(top_srcdir)/gtk/stock-icons/24/gtk-orientation-portrait.png \ $(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-landscape.png \ + $(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png \ $(top_srcdir)/gtk/stock-icons/24/gtk-paste.png \ $(top_srcdir)/gtk/stock-icons/24/gtk-preferences.png \ $(top_srcdir)/gtk/stock-icons/24/gtk-print.png \ diff --git a/docs/reference/gtk/tmpl/gtkstock.sgml b/docs/reference/gtk/tmpl/gtkstock.sgml index 36ff8036a3..4bf46b73be 100644 --- a/docs/reference/gtk/tmpl/gtkstock.sgml +++ b/docs/reference/gtk/tmpl/gtkstock.sgml @@ -678,7 +678,7 @@ The "Open" item. -The "Landscape Orientation" icon. +The "Landscape Orientation" item. @@ -687,7 +687,7 @@ The "Landscape Orientation" icon. -The "Portrait Orientation" icon. +The "Portrait Orientation" item. @@ -696,13 +696,22 @@ The "Portrait Orientation" icon. -The "Reverse Landscape Orientation" icon. +The "Reverse Landscape Orientation" item. @Since: 2.10 + + +The "Reverse Portrait Orientation" item. + + + +@Since: 2.10 + + The "Paste" item. diff --git a/gtk/Makefile.am b/gtk/Makefile.am index dba3259272..77f4ada015 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -994,6 +994,7 @@ STOCK_ICONS = \ stock-icons/24/gtk-open.png \ stock-icons/24/gtk-orientation-reverse-landscape.png \ stock-icons/24/gtk-orientation-landscape.png \ + stock-icons/24/gtk-orientation-reverse-portrait.png \ stock-icons/24/gtk-orientation-portrait.png \ stock-icons/24/gtk-paste.png \ stock-icons/24/gtk-preferences.png \ diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c index 007618fea0..820b40c461 100644 --- a/gtk/gtkpagesetupunixdialog.c +++ b/gtk/gtkpagesetupunixdialog.c @@ -991,12 +991,33 @@ page_name_func (GtkCellLayout *cell_layout, } +static GtkWidget * +create_radio_button (GSList *group, + const gchar *stock_id) +{ + GtkWidget *radio_button, *image, *label, *hbox; + GtkStockItem item; + + radio_button = gtk_radio_button_new (group); + image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_LARGE_TOOLBAR); + gtk_stock_lookup (stock_id, &item); + label = gtk_label_new (item.label); + hbox = gtk_hbox_new (0, 6); + gtk_container_add (GTK_CONTAINER (radio_button), hbox); + gtk_container_add (GTK_CONTAINER (hbox), image); + gtk_container_add (GTK_CONTAINER (hbox), label); + + gtk_widget_show_all (radio_button); + + return radio_button; +} + static void populate_dialog (GtkPageSetupUnixDialog *ps_dialog) { GtkPageSetupUnixDialogPrivate *priv = ps_dialog->priv; GtkDialog *dialog = GTK_DIALOG (ps_dialog); - GtkWidget *table, *label, *combo, *radio_button, *ebox, *image; + GtkWidget *table, *label, *combo, *radio_button, *ebox; GtkCellRenderer *cell; gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); @@ -1007,7 +1028,7 @@ populate_dialog (GtkPageSetupUnixDialog *ps_dialog) gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5); gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6); - table = gtk_table_new (4, 4, FALSE); + table = gtk_table_new (5, 4, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 6); gtk_table_set_col_spacings (GTK_TABLE (table), 12); gtk_container_set_border_width (GTK_CONTAINER (table), 5); @@ -1077,41 +1098,37 @@ populate_dialog (GtkPageSetupUnixDialog *ps_dialog) GTK_FILL, 0, 0, 0); gtk_widget_show (label); - radio_button = gtk_radio_button_new (NULL); - image = gtk_image_new_from_stock (GTK_STOCK_ORIENTATION_PORTRAIT, - GTK_ICON_SIZE_LARGE_TOOLBAR); - gtk_widget_show (image); - gtk_container_add (GTK_CONTAINER (radio_button), image); + radio_button = create_radio_button (NULL, GTK_STOCK_ORIENTATION_PORTRAIT); priv->portrait_radio = radio_button; gtk_table_attach (GTK_TABLE (table), radio_button, 1, 2, 3, 4, - 0, 0, 0, 0); - gtk_widget_show (radio_button); + GTK_EXPAND|GTK_FILL, 0, 0, 0); gtk_label_set_mnemonic_widget (GTK_LABEL (label), radio_button); - radio_button = gtk_radio_button_new (gtk_radio_button_get_group (GTK_RADIO_BUTTON(radio_button))); - image = gtk_image_new_from_stock (GTK_STOCK_ORIENTATION_LANDSCAPE, - GTK_ICON_SIZE_LARGE_TOOLBAR); - gtk_widget_show (image); - gtk_container_add (GTK_CONTAINER (radio_button), image); - priv->landscape_radio = radio_button; + radio_button = create_radio_button (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_button)), + GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT); + priv->reverse_landscape_radio = radio_button; gtk_table_attach (GTK_TABLE (table), radio_button, 2, 3, 3, 4, - 0, 0, 0, 0); + GTK_EXPAND|GTK_FILL, 0, 0, 0); + + radio_button = create_radio_button (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_button)), + GTK_STOCK_ORIENTATION_LANDSCAPE); + priv->landscape_radio = radio_button; + gtk_table_attach (GTK_TABLE (table), radio_button, + 1, 2, 4, 5, + GTK_EXPAND|GTK_FILL, 0, 0, 0); gtk_widget_show (radio_button); gtk_table_set_row_spacing (GTK_TABLE (table), 3, 0); - radio_button = gtk_radio_button_new (gtk_radio_button_get_group (GTK_RADIO_BUTTON(radio_button))); - image = gtk_image_new_from_stock (GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE, - GTK_ICON_SIZE_LARGE_TOOLBAR); - gtk_widget_show (image); - gtk_container_add (GTK_CONTAINER (radio_button), image); + radio_button = create_radio_button (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_button)), + GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE); priv->reverse_landscape_radio = radio_button; gtk_table_attach (GTK_TABLE (table), radio_button, - 3, 4, 3, 4, - 0, 0, 0, 0); - gtk_widget_show (radio_button); + 2, 3, 4, 5, + GTK_EXPAND|GTK_FILL, 0, 0, 0); + priv->tooltips = gtk_tooltips_new (); diff --git a/gtk/gtkstock.c b/gtk/gtkstock.c index 7f50d08bb5..3d8cd1d4e5 100644 --- a/gtk/gtkstock.c +++ b/gtk/gtkstock.c @@ -389,6 +389,10 @@ static const GtkStockItem builtin_items [] = { GTK_STOCK_NO, N_("_No"), 0, 0, GETTEXT_PACKAGE }, { GTK_STOCK_OK, N_("_OK"), 0, 0, GETTEXT_PACKAGE }, { GTK_STOCK_OPEN, N_("_Open"), GDK_CONTROL_MASK, 'o', GETTEXT_PACKAGE }, + { GTK_STOCK_ORIENTATION_LANDSCAPE, N_("Landscape"), 0, 0, GETTEXT_PACKAGE }, + { GTK_STOCK_ORIENTATION_PORTRAIT, N_("Portrait"), 0, 0, GETTEXT_PACKAGE }, + { GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE, N_("Reverse landscape"), 0, 0, GETTEXT_PACKAGE }, + { GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT, N_("Reverse portrait"), 0, 0, GETTEXT_PACKAGE }, { GTK_STOCK_PASTE, N_("_Paste"), GDK_CONTROL_MASK, 'v', GETTEXT_PACKAGE }, { GTK_STOCK_PREFERENCES, N_("_Preferences"), 0, 0, GETTEXT_PACKAGE }, { GTK_STOCK_PRINT, N_("_Print"), 0, 0, GETTEXT_PACKAGE }, diff --git a/gtk/gtkstock.h b/gtk/gtkstock.h index b0359f50aa..22df23ac51 100644 --- a/gtk/gtkstock.h +++ b/gtk/gtkstock.h @@ -137,6 +137,7 @@ void gtk_stock_set_translate_func (const gchar *domain, #define GTK_STOCK_ORIENTATION_PORTRAIT "gtk-orientation-portrait" #define GTK_STOCK_ORIENTATION_LANDSCAPE "gtk-orientation-landscape" #define GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE "gtk-orientation-reverse-landscape" +#define GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT "gtk-orientation-reverse-portrait" #define GTK_STOCK_PASTE "gtk-paste" #define GTK_STOCK_PREFERENCES "gtk-preferences" #define GTK_STOCK_PRINT "gtk-print" diff --git a/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png b/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png new file mode 100644 index 0000000000000000000000000000000000000000..2beec10cc7a42c5ddabff5aee904155edc33a3d1 GIT binary patch literal 871 zcmV-t1DO1YP)ZlsFm6M+t%(OU@bk!dEolehWV&aMo1ygTN*HiU8RrSJ8ekAYQ zzH{pmaR2`VT5GKx{qx4ncfIF@9{>K#ufI{N)hHH=eFL@IZNLDi*Oy3=geZ!5`Rc{n zvu9_XsNh>2rIKYoj%uB@ZQzY%eW2qLLu z>%MUM^eGxEOWd2iyQwyX&4Qa5B942rv-s%UUE$CExOSb@)*1rr**nUof1_;xsA3r6 zgdhlLuda5toA<&XK*TXMHATH%N7Xg}xPAa?hWZLbgs%KOUFoSH&QY!Ircy33Ha4~) zmg_HoVy1{VMn^||#?mu2uz&wPM1-JFpmyK@2M-?F9)S5)tW<_Lar^{f7-aD~nTKJ> zVtjm@GiPS_5;s!4yk>FS+z>ZU zQ3w#nP0y=k0=C*ME}p;W+cdSfxw5`tjb06Q0$%~m0}OO^5$T7{mmYs+ND%ll_O{{iNkgfB1Krqloc002ovPDHLkV1jCapJf05 literal 0 HcmV?d00001 -- 2.30.2